#ifndef _SYSPARA_H
#define _SYSPARA_H

#include "common_h.h"

#if SYS_DEBUG > 0
#define   sys_debug         lite_printf
#else 
#define   sys_debug(fmt,...) 	;
#endif

#define SYS_REFrESH		(0xa7b6)



typedef struct {
	u8 			chksum;		// 8bit, xor 
	u16			refresh; 		// default: 0xa7b6
	// add sys para here ...
	u8			upgrade;		// upgrade falg;  need upgrade--> TRUE
	u8 			ver[32];		// soft version
	u8 			startup;		//  record system start up reason:  re-start(TRUE) or first start up(FALSE)
	SYS_MODE 	sysrunmode;	// if ase key novalid, run factory mode;
	u8 			ext_conf;	// external monitor cfg
	u8			int_conf;	// internal monitor cfg
	u8 			sysErr;	// bit[3:0]: record self_check fail err,  bit[7:4]: monitor trigger reasion

	u32 test_val;		// for test,
	u8 reserve[128];	//	

}SYSP_ST;

SYSP_ST *sys_para_get(void);
u8 sys_default_set(void);
u8 sys_para_set(SYSP_ST para);
u8 sys_para_init(void);



#endif	

